import request from '@/utils/http'

export class DbConfigService {
  static getAll(params: any) {
    return request.post<any>({
      url: '/data-rule/db/load/all',
      params
    })
  }
  
  static getOptions(params: any) {
    return request.post<any>({
      url: '/data-rule/db/load/options',
      params
    })
  }
  
  static save(params:any) {
    return request.post<any>({
      url: '/data-rule/db/save',
  	params
    })
  }
  
  static delete(id:string) {
    return request.del<any>({
      url: '/data-rule/db/detain/'+id,
    })
  }
  
  static check(id:string) {
    return request.get<any>({
      url: '/data-rule/db/check/'+id,
    })
  }
  
  static stop(id:string) {
    return request.post<any>({
      url: '/data-rule/db/stop/'+id,
    })
  }
  
  static start(id:string) {
    return request.post<any>({
      url: '/data-rule/db/start/'+id,
    })
  }
  
}
